import requests
if __name__ == "__main__":
    headers={
        'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36 Edg/92.0.902.55'
    }
    url="https://pic.qiushibaike.com/system/pictures/12457/124572597/medium/IHR6R4X4J9KC8K63.jpg"
    
    #content返回的是二进制形式的图片数据
    #text返回字符串
    #json返回对象
    img_data=requests.get(url=url).content

    with open("./qiutu.jpg",'wb') as fp:
        fp.write(img_data)